package rozetka.pages.menu;

import org.openqa.selenium.By;
import org.openqa.selenium.WebDriver;
import rozetka.pages.BasePage;
import rozetka.utils.ReportWriter;

/**
 * Created by foneox on 05.04.2014.
 */
public class BaseMenuPage extends BasePage {

    public BaseMenuPage(WebDriver driver) {
        super(driver);
    }
    public Boolean isMenuPageOpened(By menuItemLocator){
        String menuItemHref = driver.findElement(menuItemLocator).getAttribute("href");
        String menuItemNotSelected = driver.findElement(menuItemLocator).getAttribute("onclick");
        if (menuItemHref.equals(this.getCurrentUrl())){
            return true;
        }
        return false;
    }
}
